const express = require("express");
const router = express.Router();
const {
  list,
  all,
  details,
  add,
  update,
  del,
} = require("../../controllers/system/deptsController");

/**
 * 查询所有部门信息
 * GTE  /depts/list
 */
router.get("/list", list);

/**
 * 获取所有列表数据
 * GET /depts/all
 */
router.get("/all", all);

/**
 * 查询部门详情
 * GET /depts/details
 */
router.get("/details", details);

/**
 * 新增部门
 * POST /depts/add
 */
router.post("/add", add);

/**
 * 更新部门
 * PUT /depts/update
 */
router.put("/update", update);

/**
 * 删除部门
 * DELETE /depts/delete
 */
router.delete("/delete", del);

module.exports = router;
